import service from "@/utils/request";

// @Summary 用户登录
// @Produce  application/json
// @Param data body {code:"string",mobile:"string"}
// @Router /user/login [post]
export const login = (data) => {
  return service({
    url: "/user/login",
    method: "post",
    data: data,
  });
};

// @Summary 获取验证码
// @Produce  application/json
// @Param data body {data}
// @Router /captcha/get [get]
export const captcha = (data) => {
  return service({
    url: "/captcha/get",
    method: "get",
    data: data,
  });
};

// @Summary 获取验证码
// @Produce  application/json
// @Param data body {data}
// @Router /sms/send [post]
export const getPhoneCode = (data) => {
  return service({
    url: "/sms/send",
    method: "post",
    data: data,
  });
};


// @Summary 退出
// @Produce  application/json
// @Param data body {data}
// @Router /user/logout [post]
export const logout = (data) => {
  return service({
    url: "/user/logout",
    method: "post",
    data: data,
  });
};